﻿using System.Collections.Generic;

namespace IOA.MES.ClientApi.Models.Response.Auth
{
    public class LoginResponse
    {
        private string _trueName;
        private string _language;
        private string _token;

        ///<Summary>
        /// 真实姓名
        ///</Summary>
        public string TrueName
        {
            get { return string.IsNullOrWhiteSpace(_trueName) ? string.Empty : _trueName; }
            set { _trueName = value; }
        }

        ///<Summary>
        /// 语言
        ///</Summary>
        public string Language
        {
            get { return string.IsNullOrWhiteSpace(_language) ? string.Empty : _language; }
            set { _language = value; }
        }

        /// <summary>
        /// 令牌
        /// </summary>
        public string Token
        {
            get { return string.IsNullOrWhiteSpace(_token) ? string.Empty : _token; }
            set { _token = value; }
        }

        /// <summary>
        /// 岗位列表
        /// </summary>
        public List<Role> Roles { get; set; } = new List<Role>();

        /// <summary>
        /// 车间列表
        /// </summary>
        public List<SimpleWorkshop> Workshops { get; set; } = new List<SimpleWorkshop>();

        /// <summary>
        /// FTP配置
        /// </summary>
        public FtpConfig FtpConfig { get; set; }
    }

    /// <summary>
    /// FTP配置
    /// </summary>

    public class FtpConfig
    {
        /// <summary>
        /// FTP地址
        /// </summary>
        public string FtpRoot { get; set; }

        /// <summary>
        /// FTP账号
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// FTP密码
        /// </summary>
        public string Password { get; set; }
    }

    /// <summary>
    /// 角色
    /// </summary>
    public class Role
    {
        private string _roleName;

        /// <summary>
        /// 岗位ID
        /// </summary>
        public int RoleId { get; set; }

        /// <summary>
        /// 岗位名称
        /// </summary>
        public string RoleName
        {
            get { return string.IsNullOrWhiteSpace(_roleName) ? string.Empty : _roleName; }
            set { _roleName = value; }
        }
    }

    /// <summary>
    /// 车间
    /// </summary>
    public class SimpleWorkshop
    {
        private string _workshopName;

        /// <summary>
        /// 车间代码
        /// </summary>
        public string WorkshopCode { get; set; }

        ///<Summary>
        /// 车间名称
        ///</Summary>
        public string WorkshopName
        {
            get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
            set { _workshopName = value; }
        }
    }
}
